# Redis

FROM            10.0.16.125:5080/general/ubuntu:16.04
MAINTAINER      Lijc lijc@siccs.cn
# install deb
RUN             apt-get update && apt-get -y install redis-server
# modify config file
RUN             sed -i -e '/^daemonize/cdaemonize no' -e '/^bind 127.0.0.1/d' /etc/redis/redis.conf
# create persistent volume directory
RUN             mkdir /opt/pv
RUN             cd /opt/pv && mkdir -p redis_data redis_log
RUN             rm -rf /var/lib/redis /var/log/redis
RUN             ln -s /opt/pv/redis_data /var/lib/redis
RUN             ln -s /opt/pv/redis_log /var/log/redis
# import docker entry script
ADD             docker-entrypoint /opt/
RUN             chmod 0755 /opt/docker-entrypoint
EXPOSE          6379
CMD             /opt/docker-entrypoint

